Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore payload processing for diagnostics:ping #65

Closed
wants to merge 29 commits into from

Conversation

tkrisztian95
Copy link

Fix plugin responses error for Bitbucket Webhooks when Test Connection.
When using a Post Webhook "Test Connection" button on push with Bitbucket Server 6.1.3 (self-hosted). I am using Bitbucket Plugin 1.1.10. (on Jenkins 2.187)
Error:
at net.sf.json.JSONObject.getString(JSONObject.java:2040) at com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor.processPostServicePayload(BitbucketPayloadProcessor.java:143) at com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor.processPayload(BitbucketPayloadProcessor.java:38) at com.cloudbees.jenkins.plugins.BitbucketHookReceiver.doIndex(BitbucketHookReceiver.java:54) at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408)

fbelzunc and others added 29 commits November 2, 2017 10:58
[FIXED JENKINS-47782] Migrate to 2.7 parent pom
[JENKINS-47782] Add findbugs-exclude.xml
[JENKINS-28877] Adding BitBucket server webhook
[FIXED JENKINS-28877] remove /scm before GitStatus.looselyMatches to match …
[JENKINS-57787] Use `nickname` or `display_name` instead of `username` field
Fix: Bitbucket push can now kick off Jenkins Pipeline Jobs
…ugin

# Conflicts:
#	src/main/java/com/cloudbees/jenkins/plugins/BitbucketPayloadProcessor.java
@krotte1
Copy link

krotte1 commented Aug 14, 2019

This would be a good fix to have.

@tzachs
Copy link
Collaborator

tzachs commented Aug 3, 2020

@tkrisztian95 is this still relevant? the code base has changed due to update of the plugin to version 2.204.1

@tkrisztian95
Copy link
Author

tkrisztian95 commented Aug 5, 2020

@tzachs Good question. Maybe it is, however it was a while when I was working with this plugin and Jenkins. I'm pretty sure if a diagnostics message comes from Bitbucket we should not pass it to further processing. This caused problems in our setup due to the plugin tried to parse out info from the ping message instead of simply ignoring it.

@tzachs
Copy link
Collaborator

tzachs commented Aug 8, 2020

@tkrisztian95 thanks for getting back to me. I appreciate it a lot :)
I'll see how I can merge the code or I'll just copy the commit content and write this PR and you as the contributor.
Is that OK?

@tzachs
Copy link
Collaborator

tzachs commented Aug 11, 2020

@tkrisztian95 ?

@tkrisztian95
Copy link
Author

@tzachs Sorry for the late reply. Sure, it ok!

@tzachs
Copy link
Collaborator

tzachs commented Aug 29, 2020

@tkrisztian95 I've manually added the code in 1.1.23, thanks for this PR 😃

@tzachs tzachs closed this Aug 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants